<template>
  <view class="logistics-cont">
    <basePage :show-tabbar="false" :page-params="pageParams">
      <!-- 纵向排列 -->
      <uni-steps :options="itemList" direction="column" :active="0" active-color="#FF6010" />
    </basepage>
  </view>

</template>

<script>
import uniSteps from '@/uni_modules/uni-steps/components/uni-steps/uni-steps'
import basePage from '@/components/base-page';
import { integralExpress } from '@/api/yc_userInfo'
export default {
  name: 'LogisticsInfo',
  components: {
    uniSteps,
    basePage

  },
  data() {
    return {

      itemList: [],
      pageParams: {
        state: '',
        emptyTitle: '没有物流信息～',
        errorTitle: '请求失败',
        showButton: false
      },
      orderSn: '',
      nums: '',
    }
  },
  watch: {
  },
  onLoad(option) {
    const { orderSn, nums } = option
    this.integralExpress(orderSn, nums)
  },
  methods: {
    integralExpress(orderSn, nums) {
      const params = {
        nums: nums,
        orderSn: orderSn
      }
      integralExpress(params).then((res) => {
        if (res.code == 0) {
          if (res.data.expTrack.length > 0) {
            res.data.expTrack.forEach(item => {
              this.itemList.push({
                title: item.status,
                desc: item.time

              })
            });
          }
        }
      })
    }

  }
}
</script>

<style  lang="scss">
.logistics-cont{
    padding: 20px;
    background: $uni-f5bg-color;
}
</style>
